// app.js
App({
  onLaunch() {
    const {statusBarHeight,screenHeight,safeArea} = wx.getSystemInfoSync()
    this.globalData.statusBarHeight = statusBarHeight
    this.globalData.screenHeight = screenHeight
    const  {top,height,bottom} = wx.getMenuButtonBoundingClientRect()
    this.globalData.navHeight = (top - statusBarHeight) + bottom
    this.globalData.menuTop = top
    this.globalData.menuHeight = height
    // 安全区
    this.globalData.safeHeight = screenHeight - safeArea.bottom
   //tabBar的高度
   this.globalData.tabBarHeight =  40 + 16 + this.globalData.safeHeight
  },
  globalData: {
    userInfo: null,
    statusBarHeight:null,
    navHeight:null,
    menuTop:null,
    menuHeight:null,
    screenHeight:null,
    safeHeight:null,
    tabBarHeight:null
  }
})
